#include "stdafx.h"
#include "InjureEffective.h"


CInjureEffective::CInjureEffective()
{
}


CInjureEffective::~CInjureEffective()
{
}

CInjureEffective::CInjureEffective(IplImage *img[], CvPoint pos)
{

	for (int i = 0; i < INJURE_IMAGE_COUNT; i++) {
		m_Img[i] = img[i];
	}
	m_DrawPos.x = pos.x, m_DrawPos.y = pos.y;
	m_isClear = false;
	m_StateId = 0;
}

void CInjureEffective::DrawToBack(IplImage *Bg)
{
	if (m_StateId >= INJURE_IMAGE_COUNT) {
		m_isClear = true;
		return;
	}
	CTools::DrawToBackground(m_DrawPos.x, m_DrawPos.y, Bg, m_Img[m_StateId++], 255, 255, 255);
}


bool CInjureEffective::CheckisClear()
{
	return m_isClear;
}
